package com.hljx.task;

import com.hljx.entity.UndrugInfo;
import com.hljx.service.UndrugInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @BelongsProject: hljx
 * @BelongsPackage: com.hljx.task
 * @Author: lp
 * @CreateTime: 2023-12-13  11:30
 * @Description: TODO
 * @Version: 1.0
 */
@Component
public class ScheduleTask {


    @Autowired
    private UndrugInfoService  undrugInfoService;

    /**
     * 定时任务每天更新收费项目
     */
    @Scheduled(cron = "0 0 0 * * ?")
    @Async
    public void configureTask2(){
        undrugInfoService.updateUnDrugInfo();
        System.out.println("1111");
    }
}
